package com.jsj.controller;

import com.jsj.domain.Siminfo;
import com.jsj.service.ISiminfoService;
import com.ruoyi.common.core.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;


/*
相似度
 */
@RestController
@RequestMapping("/siminfo")
public class SiminfoController extends BaseController {
    @Autowired
    private ISiminfoService iSiminfoService;

    /**
     * 查询题目提交相似度
     */
    @RequestMapping(value = "/query/{sourceId}", method = {RequestMethod.POST})
    @ResponseBody
    @PreAuthorize("@ss.hasAnyRoles('student,teacher,admin')")
    public Siminfo query(@PathVariable("sourceId") long sourceId) {
        return iSiminfoService.querySiminfo(sourceId);
    }
}
